package com.learn.educommentboot.service;


import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.learn.eduapi.entity.comment.CourseComment;
import com.learn.eduapi.entity.comment.CourseCommentFavoriteRecord;
import org.apache.ibatis.annotations.*;

import java.util.List;

public interface CourseCommentService {
    CourseCommentFavoriteRecord  selectByCourseCommentFavoriteRecordId(@Param("userId")Integer userId, @Param("commentId")Integer commentId);

    List<CourseComment> selectgetAllComment(@Param("userId")Integer userId, @Param("id") int id, @Param("pageNum") int pageNum, @Param("pageSize") int pageSize);

    void addComment(CourseComment comment);

    void addCommentFavorite(CourseCommentFavoriteRecord courseCommentFavoriteRecord);

    void OneaddCommentFavorite(CourseCommentFavoriteRecord courseCommentFavoriteRecord);

    void updateComment(String updateTime,Integer commentId, Integer userId);

    int updateCommentSave(String updateTime,Integer commentId, Integer userId);

    Integer selectLikeCount(Integer commentId);

    void updateLikeCount(Integer i,Integer commentId);

    int delComment(Integer commentId);

    List<CourseComment> getCommentList(@Param("find") String find, @Param("page")Integer page, @Param("size")Integer size);

    int updateAdminComment(CourseComment courseComment, Wrapper<CourseComment> wrapper);

    List<CourseComment> getAdminCommentRecord(@Param("find")String  find,@Param("page") int page, @Param("size") int size);

    List<CourseCommentFavoriteRecord> getCrouseRavoritesUserList(@Param("Id") Integer Id);

    int delAmdinCommentFavorite(Integer id);

}
